<?php

	include_once('../sys/sys.php');
	header('Content-Type: text/html; charset=utf-8');
	//获取系统内容以及分页
	
	//获取分类以及分页号
	$st = $_GET['st'];
	$name = trim($_GET['name']);
	if (strlen($name) < 1) {
		$name = trim($_POST[name]);
		//重定向为GET方法
		$get_url = SITE_URL_MB . 'mb178/searchkw' . urlencode($name) . 'st0.html';
		//echo $get_url;exit;
		header( "Location:" . $get_url . '');
	}

	//echo $name;exit;
	
	if(is_null($st)){$st = 0;}
	
	//初始化模版变量
	$page = init_smart_template_obj('mb178/search.html',CACHE_DIR,CACHE_DIR,TEMPLATE_DIR);
	$page->assign("sname",$name);
	$page->assign("st",$st);
	$page->assign("system",$sysinfo);
	$page->assign("title",'"' . $name . '"的搜索结果');

	$page->output();
	
?>